package com.example.cuibo.androidstudybasicknowadge;

/**
 * Created by cuibo on 2017/10/26.
 */

public class 有参构造方法 {

    String name = "张三";
    int age = 23;
    char gender = '男';
    public void study(){

    }
    public void seelp(){

    }
    public 有参构造方法(String name ,int age){
        this.age = age;
        this.name = name;
    }

    public int sum(int a, int b){
        return a + b;
    }
}
class Cuibo{
    private String name;
    private int age;
    public Cuibo(){

    }; // 空参的构造方法
    public Cuibo(String naem, int age){
        this.name = naem;
        this.age = age;
    }
    public void setName(String name){
        this.name = name;
    }
    public void setAge(int age){
        this.age = age;
    }
    public String getName(){
        return this.name;
    }
    public int getAge(){
        return this.age;
    }
}